The Variable Viewer

The Variable Viewer shows a specified variable, class or package in a tree.
To see variables or objects in the Variable Viewer at a breakpoint

- in the Source Editor (debug mode), highlight an object and press the Print * or the Print button or
- in the Debugger Command Line Shell, type

print <id> or type print* <id> or
- in the Debugger Command Line Shell, type
display <id> to see variables displayed and automatically updated at each breakpoint.
To see all the local variables in the Variable Viewer at a breakpoint

- in the Source Editor (debug mode), press the this button or
- in the Debugger Command Line Shell, type

this

- By default, SNiFF+ reuses tools to prevent screen cluttering. To open another Variable Viewer, you can freeze the already open tool by enabling Frozen.
- A shift-click on a tree-node zooms in on the selected variable.
- A click on a simple data-type makes this entry editable in the Variable field (this does not work with array elements, and variables which are not in a record, a class, or an interface). Editing can be cancelled by hitting
<Esc> , or by clicking into another node.
The Variable Viewer menu
Tools
> Close Tool: Closes this tool
> Duplicate Tool: Sets this Variable Viewer to frozen and opens a new Variable Viewer
> Threadsview: Opens a Threads Viewer
> About SNiFF+ Jdb: Opens an About dialog
View
> Update: Updates the contents of the selected variable in the current view
> Show typed names on/off: Shows the selected variable with or without modifiers and types. If no node is selected, the base node is shown
> List all classes: Shows all loaded classes
> Show source: Shows the source of the variable (the position of the breakpoint when the Variable Viewer was opened)
Tree
> Expand one level: Expands all currently visible unexpanded nodes one level
> Collapse all: Collapses all expanded nodes
Node
> Show father: Shows the father of the currently shown variable (if it exists)
> Expand: Expands the selected node
> Collapse: Collapses the selected node
> Array size 5 - 50: Defines how arrays are subdivided on being opened
History
> 1-10: The last 10 variables shown by this Variable Viewer (the last entry is the currently shown variable)
The Variable Viewer icons
Simple data types
Integer types: - short, - int, long
Real numbers: - float, - double
Special: - boolean, - byte, - char
Expandible nodes (first icon: collapsed / second icon: expanded)
, - record
, - array (grayscale, color)
, - part of an array (grayscale, color)
, - class (black, red)
, - interface (black, green)
, - base node with current path (gray, red)
Non-expandible nodes
- null pointer (in record, array, class or interface)
- method, shown in classes
- instance field, shown in classes, without data
- error node or null pointer (local or static)
Other information
, , ... icons are checkmarked if already shown at a higher level
, ,... icons are marked with a red dot after a forced update if the value has changed.